<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>地图</title>
       <script type="text/javascript" src="http://api.tianditu.gov.cn/api?v=4.0&tk=7bed489c2c6c48024503bfeb4ef3e97f"></script>
    <script>
        var map;
        var zoom = 12;
        function onLoad() {
            console.log('showMap');
            map = new T.Map('mapDiv');
            map.centerAndZoom(new T.LngLat(116.40769, 39.89945), zoom);
            console.log('Done');
        }
    </script>
</head>

<body onLoad="onLoad()">
    <div id="mapDiv" style="position:absolute;width:100vw; height:98vh"></div>
</body>

</html>